<!DOCTYPE html>
<html lang="en">
{include file='public/head'/}
<style>
    #container {
        width: 1105px;
        margin: 20px auto;
        padding: 20px;
        background-color: #fff;
    }

    #container p {
        line-height: 35px !important;
    }

    #container > div > table {
        width: 100% !important;
    }

    #htm {
        box-sizing: border-box;
    }
</style>
<body>
<div id="container">
    <div id="htm">{$article|raw}</div>
    {notempty name="files"}
    <div id="file" class="layui-form-item">
        <label class="layui-form-label">附件：</label>
        <ul class="layui-input-block">
            {volist name="files" id="vo"}
            <li style="padding: 10px 0">
                <a href="javascript:;" onclick="downloadFile('{$vo.name}','{$vo.src}')">
                    {$vo.name}
                </a>
            </li>
            {/volist}
        </ul>
    </div>
    {/notempty}
    {notempty name="hyperlink"}
    <div class="file" style="padding-bottom: 20px">
        <h3 style="font-size: 16px">相关链接：<a href="{$hyperlink}">{$hyperlink|substr=0,50}</a></h3>
    </div>
    {/notempty}
</div>

<script>
    function downloadFile(name, src) {
        let a = document.createElement('a')
        a.href = src
        a.download = name
        a.click()
    }
</script>
</body>
</html>